/*
 * Copyright (c) 2009-2013 EvTech Project
 * All rights reserved.
 * 
 * This file is part of Symbol Matching.
 *
 * Symbol Matching is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or 
 * (at your option) any later version.
 *
 * Symbol Matching is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with Symbol Matching.  If not, see <http://www.gnu.org/licenses/>.
 * 
 */
package fi.honkalampisaatio.reaktiopeli.game;

import java.util.ArrayList;
import java.util.Random;


public class QuestionElement {
	private ArrayList<MediaElement> questionList;
	private MediaElement answer;
	private Random rnd = new Random();
	
	public ArrayList<MediaElement> getQuestionList() {
		return questionList;
	}
	public void setQuestionList(ArrayList<MediaElement> questionList) {
		this.questionList = questionList;
	}
	public MediaElement getAnswer() {
		return answer;
	}
	public void setAnswer(MediaElement answer) {
		this.answer = answer;
	}
	public MediaElement getRandomQuestion() {
		MediaElement retVal = null;
		if(questionList!=null && questionList.size()>0) {
			retVal = questionList.get(rnd.nextInt(questionList.size()));
		}
		
		return retVal;
	}
}
